package cn.xiaopengstack.infrastructure.repository.dao;

import cn.xiaopengstack.domain.order.model.entity.PayOrderEntity;
import cn.xiaopengstack.infrastructure.repository.po.PayOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* @author jiangyangang
* @description 针对表【pay_order】的数据库操作Mapper
* @createDate 2025-09-19 16:45:58
* @Entity cn.xiaopengstack.infrastructure.repository.po.PayOrder
*/
@Mapper
public interface IPayOrderDao {

    int insertSelective(PayOrder record);

    int updateByPrimaryKeySelective(PayOrder record);

    int updateByPrimaryKey(PayOrder record);

    /**
     * 查询未支付的订单
     * @param productId
     * @param userId
     * @return
     */
    PayOrder selectUnpayOrder(@Param("productId") String productId, @Param("userId") String userId);

    /**
     * 更新订单
     * @param payOrder
     */
    void updateByOrderIdSelective(PayOrder payOrder);
}
